<p>Custom template for all selected items using <b>ng-multi-label-tmp</b></p>

<ng-select
	[items]="githubUsers$ | async"
	[multiple]="true"
	bindLabel="login"
	bindValue="login"
	placeholder="Select items"
	[(ngModel)]="selectedUsers">
	<ng-template ng-multi-label-tmp let-items="items" let-clear="clear">
		@for (item of items | slice: 0 : 2; track item) {
			<div class="ng-value">
				<span class="ng-value-label"><img [src]="item.avatar_url" width="20px" height="20px" /> {{ item.login }}</span>
				<span class="ng-value-icon right" (click)="clear(item)" aria-hidden="true">×</span>
			</div>
		}
		@if (items.length > 2) {
			<div class="ng-value">
				<span class="ng-value-label">{{ items.length - 2 }} more...</span>
			</div>
		}
	</ng-template>
</ng-select>
